local skels = {}

Fk:loadTranslationTable{
  ["rmt__jinzunjiu"] = "金樽",
  [":rmt__jinzunjiu"] = "本局游戏限X次，你可以视为使用一张【酒】。",
} 

for loop = 0, 30 do
  local jinzunjiu = fk.CreateSkill{
    name = loop == 0 and "rmt__jinzunjiu" or "rmt"..loop.."__jinzunjiu",
  }

  jinzunjiu:addEffect("viewas", {
    card_num = 0,
    target_num = 0,
    anim_type = "offensive",
    pattern = "analeptic",
    times = function (self, player)
      return player:getMark(""..jinzunjiu.name)
    end,
    dynamic_desc = function(self, player)
      local mark = player:getMark(""..jinzunjiu.name) 
      local mark2 = player:getMark(""..jinzunjiu.name.."record") ~= nil and player:getMark(""..jinzunjiu.name.."record") or "不可用"
      return "本局游戏限"..mark.."次，你可以视为使用一张【酒】（来源：【"..Fk:translate(mark2).."】）。"
    end,
    card_filter = Util.FalseFunc,
    view_as = function(self, player, cards)
      local c = Fk:cloneCard("analeptic")
      c.skillName = jinzunjiu.name
      return c
    end,
    before_use = function(self, player, use)
      local room = player.room 
      room:removePlayerMark(player, ""..jinzunjiu.name, 1)
    end,
    enabled_at_play = function(self, player)
      return player:getMark(""..jinzunjiu.name) > 0
    end,
    enabled_at_response = function(self, player, res)
      local to_use = Fk:cloneCard("analeptic")
      return not res and Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(to_use)
      and player:getMark(""..jinzunjiu.name) > 0
    end,
  })

  Fk:loadTranslationTable{
    ["rmt"..loop.."__jinzunjiu"] = "金樽",
    [":rmt"..loop.."__jinzunjiu"] = "本局游戏限X次，你可以视为使用一张【酒】。",
  }

  table.insert(skels, jinzunjiu)
end

return skels
